Skip to content

Execution API: Resolve retry callback team via TI history#67998

Open
GayathriSrividya wants to merge 2 commits into
apache:mainfrom
GayathriSrividya:fix/retry-callback-team-name-67923
Open

Execution API: Resolve retry callback team via TI history#67998
GayathriSrividya wants to merge 2 commits into
apache:mainfrom
GayathriSrividya:fix/retry-callback-team-name-67923

Conversation

@GayathriSrividya

@GayathriSrividya GayathriSrividya commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

closes #67923

Summary

This PR fixes retry callback team-name resolution in the execution API.

Root cause

Team lookup could miss in retry/history-backed paths when only active task-instance context was considered, causing downstream failures (500 / SQLAlchemy argument errors).

Changes

  • Update execution API team lookup to resolve from both:
    • task_instance
    • task_instance_history
  • Keep behavior unchanged when multi-team is disabled.

Tests

Added coverage in airflow-core/tests/unit/api_fastapi/execution_api/test_security.py for:

  • sync helper behavior with multi-team on/off
  • SQL statement includes both TI and TI history sources (UNION ALL)

Local validation

  • Ruff format/check passed on modified files.
  • uv run --project airflow-core pytest airflow-core/tests/unit/api_fastapi/execution_api/test_security.py -xvs passed.

Scope

This change is intentionally scoped to retry callback team-name resolution only.

@boring-cyborg boring-cyborg Bot added area:API Airflow's REST/HTTP API area:task-sdk labels Jun 4, 2026
@potiuk potiuk added the ready for maintainer review Set after triaging when all criteria pass. label Jun 8, 2026
@potiuk

potiuk commented Jun 25, 2026

Copy link
Copy Markdown
Member

@GayathriSrividya — I've removed the ready for maintainer review label because the next step here is yours: this branch now has merge conflicts with main. It'll go back into the maintainer queue automatically once you rebase onto the latest main and push — no need to re-add the label by hand. There's no rush.

Automated triage note drafted by an AI-assisted tool — may get things wrong; a real Apache Airflow maintainer takes the next look once it's green. (why automated)


Drafted-by: Claude Code (Opus 4.8); reviewed by @potiuk before posting

@potiuk potiuk removed the ready for maintainer review Set after triaging when all criteria pass. label Jun 25, 2026
@potiuk potiuk added the ready for maintainer review Set after triaging when all criteria pass. label Jul 2, 2026
@GayathriSrividya
GayathriSrividya force-pushed the fix/retry-callback-team-name-67923 branch from 4255c7d to eca0773 Compare July 14, 2026 08:06
@GayathriSrividya

Copy link
Copy Markdown
Contributor Author

@GayathriSrividya — I've removed the ready for maintainer review label because the next step here is yours: this branch now has merge conflicts with main. It'll go back into the maintainer queue automatically once you rebase onto the latest main and push — no need to re-add the label by hand. There's no rush.

Automated triage note drafted by an AI-assisted tool — may get things wrong; a real Apache Airflow maintainer takes the next look once it's green. (why automated)

Drafted-by: Claude Code (Opus 4.8); reviewed by @potiuk before posting

I’ve rebased this onto the latest main commit to branch. It should be back in sync now.

@GayathriSrividya
GayathriSrividya force-pushed the fix/retry-callback-team-name-67923 branch from 9a24f09 to 450cb99 Compare July 14, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API area:task-sdk ready for maintainer review Set after triaging when all criteria pass.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Airflow Fails to Access team_a_retry_call_back Connection During Retry Callback Execution with Multi-Team Setup

2 participants